This document provides instructions for downloading and installing R and RStudio on an Apple Macintosh machine.
2. Make sure that you have about 500 MB of free space on your machine. We will need this space to install both R and RStudio, and when the program installs the compressed files expand to take much more space.
Go to this website.
If your mac is OS X 10.11 and higher (this should be the case for most of you), click the R-3.5.1.pkg
link. If your mac is OS X 10.9 or 10.10, click the R-3.3.3.pkg
link.
After clicking on the link, the file (package installer) will be downloaded onto your computer. Once the file has been downloaded, click on the link and walk through the installation process. Accept the default options for now.
R is now installed on your computer.
The >
character is called the prompt and is the place where we enter commands for the program to interpret. For instance, if you type 25+26
followed by the return/enter key, you will see:
25+26
## [1] 51
q()
and htting the return key.q()
R will ask you if you want to save your work:
Click on “Don’t Save”. You have now left R.
We are not going to use R this way often, as we will use an integrated environment called RStudio.
Go to this website.
Click on the “RStudio 1.1.456 - Mac OS X 10.6+ (64-bit)” link. The file download will begin.
Once the file has been downloaded, click on it. A window should pop up:
Click on the RStudio icon and drag it into the Applications folder.
RStudio is now installed on your computer.
Note: For RStudio to work, R needs to be installed first.
Just as in R, the >
character in the Console window is where we enter commands for the program to interpret.
To exit RStudio, click “RStudio” in the menu bar, then click “Quit RStudio”. Alternatively, use the Cmd-Q
shortcut. If prompted to save the workspace, do not save it.